package com.zty.bjcrm.web.controller;

import com.zty.bjcrm.model.CosOrder;
import com.zty.bjcrm.model.PageResult;
import com.zty.bjcrm.service.IOrderService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.ResponseBody;

import java.util.ArrayList;
import java.util.List;

@Controller
@RequestMapping("/order")
public class OrderController {

    @Autowired
    IOrderService orderService;

    @RequestMapping("/list")
    public String list() {
        return "order/list";
    }

    @RequestMapping("listJson")
    @ResponseBody
    public PageResult<CosOrder> listJson() {
        PageResult<CosOrder> result = orderService.findPageResult(null,1,8);

        return result;
    }


}
